#pragma once

#ifndef _CORE_DEFINATIONS_H_
#define _CORE_DEFINATIONS_H_

#include <vector>

#include "QuestionAndAnswer.h"

namespace ExamSystem
{
    typedef struct ExamInformation
    {
        // identity string, different between exams
        std::string examIdentity;

        // exam date time, it should be the date and time of the server
        std::string examDateTime;

        // the exam status
        enum ExamStatus { Preparing = 0, Processing, Finished };
        ExamStatus examStatus;

        enum QuestionGeneration { Random = 0, Specified };
        QuestionGeneration examQuestionGenerationMethod; 

        // the questions
        // for random generation, it provides the question count for each type.
        // for specified generation, it provides the question ids
        std::vector<int> examQuestions[QuestionTypeCount];
        double examQuestionCoefs[QuestionTypeCount];

        // the rest time for this exam, in second
        unsigned int examRestTime;
        // the total exam time
        unsigned int examTotalTime;

        // local information, these won't be transfered
        unsigned int examStartTime;
        unsigned int examEndTime;
    } ExamInformation;

    typedef struct StudentInfo 
    {
        std::string studentNumber;
        std::string studentName;
    } StudentInfo;

}

#endif